package jvm.chapter2;

/**
 * @program: algorithm
 * @description: VM args: -Xss2M
 * @author: 陈恩涛
 * @create: 2021-10-13 09:47
 **/
public class JavaVMStackOOM {

    private void dontStop() {
        while (true) {

        }
    }

    public void stackLeakByThread() {
//        while (true) {
//            new Thread(() -> {
//                dontStop();
//            }).start();
//        }
    }

    public static void main(String[] args) {
        JavaVMStackOOM javaVMStackOOM = new JavaVMStackOOM();
        javaVMStackOOM.stackLeakByThread();
    }
}
